Adding new hardware to or performing maintenance on a computer often requires accessing hardware components inside the housing of the computer. Typically, gaining access to the inside of the computer housing requires the removal of a cover, access panels, or lid of the housing. To protect the safety of the person working on the computer and to prevent the components in the computer from being damaged, it is important that the electrical power to the components be turned off when the cover is removed.
In many applications, however, a computer is not completely powered down even when it is not being used. For instance, a computer may implement a Sleep mode, such as the S3 state of the Advanced Configuration and Power Interface (ACPI) specification. In the sleep mode, the higher-level applications and peripheral devices of the computer system are not in operation, but the rest of the computer system remains on. To a user or service technician, the computer may appear to have been turned off. If the user or technician removes the cover and touches the components in the computer without completely powering off the computer, injury or device damage may occur, and the state data of the computer may be lost.
To prevent access to the internal components of a computer when the computer is still on, mechanical switches have traditionally been used for detecting the removal of the cover (or access panel or lid) of the computer housing. In such an application, the mechanical switch is pressed down by the cover when the cover is mounted in its normal closed position. Removing the cover causes the closing (or opening) of the switch contact, which triggers the computer operating system to shut down the computer.
The mechanical switches, however, are not satisfactory. The mechanical switches have to be accurately positioned and aligned to correctly register removal of the covers and, just as importantly, to avoid falsely registering removal when the covers are in fact in place. Moreover, they are subject to corrosion. Being mechanical devices, the switches are also subject to physical wear over repeated uses and may be damaged upon incorrect removal of the cover.